package com.seelyn.rhea.mvc.internal.enums;

/**
 * @author linfeng
 * @since 2016/1/22
 */
public enum HttpMethod {
    GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE, BEFORE, AFTER;

    public static HttpMethod hasName(String method) {
        for (HttpMethod httpMethod: HttpMethod.values()) {
            if (httpMethod.name().equalsIgnoreCase(method)) {
                return httpMethod;
            }
        }
        return null;
    }

}
